#pragma once

#ifndef UNICODE
#define UNICODE
#endif
#define D3D_DEBUG_INFO
#define comptr ComPtr
#define Comptr ComPtr
#define comPtr ComPtr
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "uuid.lib")
#pragma comment(lib, "d3dcompiler.lib")
#pragma comment(lib, "d3d10_1.lib")
#pragma comment(lib, "d2d1.lib")
#pragma comment(lib, "dwrite.lib")
#pragma comment (lib, "dinput8.lib")

#include <d3d11.h>
#include <d3d10_1.h>
#include <dxgi.h>
#include <d2d1.h>
#include <d3dcompiler.h>
#include <dinput.h>
#include <DirectXMath.h>
#include <DirectXColors.h>

#include <windows.h>
#include <sstream>
#include <map>
#include <fstream>
#include <istream>
#include <iostream>
#include <string>
#include <dwrite.h>
#include <wrl.h>
#include <vector>

using namespace Microsoft::WRL;
using namespace DirectX;
using namespace std;

//struct cbPerObjectType
//{
//	XMMATRIX  PVW;
//	XMMATRIX  World;
//};
struct cbPerObjectType
{
	XMMATRIX  PVW;
	XMMATRIX World;
	XMFLOAT4 difColor;
	bool hasTexture;
};
//struct Light
//{
//	Light()
//	{
//		ZeroMemory(this, sizeof(Light));
//	}
//	XMFLOAT3 dir;
//	float pad;
//	XMFLOAT4 ambient;
//	XMFLOAT4 diffuse;
//};
struct Light
{
	Light()
	{
		ZeroMemory(this, sizeof(Light));
	}
	XMFLOAT3 pos;
	float range;
	XMFLOAT3 dir;
	float cone;
	XMFLOAT3 att;
	float pad2;
	XMFLOAT4 ambient;
	XMFLOAT4 diffuse;
};
struct cbPerFrameType
{
	Light light;
};